package com.gdyx.app.web.dao;

import com.gdyx.app.web.model.MpsUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by Y_Coffee on 2017/8/4.
 */
@Mapper
public interface MpsUserRoleDao extends BaseDao {
    List<MpsUserRole> findUserRoles(Map<String, Object> map);

    List<MpsUserRole> findUserRoleByUid(String id);

    List<MpsUserRole> findUserRoleByRid(String id);

    void deleteByUid(String id);

    void deleteByRid(String id);

    MpsUserRole findUserRolesByUserIdAndRoleId(@Param("userId") String userId, @Param("roleId") String roleId);

    void deleteByUidAndRid(@Param("userId") String userId, @Param("roleId") String roleId);
}
